﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using NCS.IConnect.ApplicationContexts;

namespace JM.JCY.SharePointComponent.PerformanceArchives.PerfArchivesLefMenu
{
    public partial class PerfArchivesLefMenuUserControl : UserControl
    {
        protected string contextId
        {
            get
            {
                return ApplicationContext.Current.GetKeyValue("ContextId").ToString();
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            string sourceDirectory = this.Parent.AppRelativeTemplateSourceDirectory;    //Example:   ~/_CONTROLTEMPLATES/JM.OCP.SharePointComponent.Broadcast/CreateBroadcastsRole/
            string webPartName = sourceDirectory.Substring(sourceDirectory.TrimEnd('/').LastIndexOf('/') + 1).TrimEnd('/');

            switch (webPartName.ToLower())
            {
                case "performancebasicinfo":
                    this.lbPerformanceInfo.CssClass = "leftmenuSelected";
                    break;
            }

        }
    }
}
